package com.botann.projects.controller;
import com.botann.projects.base.BaseController;
import com.botann.projects.base.Model;
import com.botann.projects.service.TestServiceIntf;
import com.botann.projects.base.BaseController;
import com.botann.projects.base.Model;
import com.botann.projects.service.TestServiceIntf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * stock
 * TestController
 * Created by 刘山国 on 2019/6/5.
 * Copyright (c) 2017 伯坦科技. All rights reserved
 */
@RestController
public class TestController extends BaseController {
    @Override
    public Class loggerClass() {
        return TestController.class;
    }

    @Autowired
    private TestServiceIntf service;

    @RequestMapping(value = "/public/testDate")
    public Model testDate() {
        try {

            service.updateTestDo();
            return successModel("成功!");
        } catch (Exception e){
            return failureModel(e);
        }
    }

    @RequestMapping(value = "/public/checkTestDate")
    public Model checkTestDate() {
        try {
            service.loadCheckTestDate();
            return successModel("成功!");
        } catch (Exception e){
            return failureModel(e);
        }
    }



}
